<template>
  <transition name="boqii-toast-pop">
    <div class="boqii-toast" v-show="visible">
      <span>{{message}}</span>
    </div>
  </transition>
</template>

<style lang="scss">
.boqii-toast {
  position: fixed;
  max-width: 80%;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  box-sizing: border-box;
  text-align: center;
  z-index: 1000;
  transition: opacity 0.3s linear;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  padding: 0.04rem 0.1rem;
  font-size: 0.14rem;
  border-radius: 0.08rem;
  display: flex;
  justify-content: center;
  align-items: center;
}
.boqii-toast-pop-enter,
.boqii-toast-pop-leave-active {
  opacity: 0;
}
</style>
<script type="text/babel">
export default {
  props: {
    message: String,
    className: {
      type: String,
      default: ''
    },
    position: {
      type: String,
      default: 'middle'
    },
    iconClass: {
      type: String,
      default: ''
    }
  },

  data() {
    return {
      visible: false
    }
  }
}
</script>